package in.iqing.base;

import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.preference.PreferenceFragment;

public abstract class BasePrefrenceFragment extends PreferenceFragment {

	public BasePrefrenceFragment() {
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

		onInitialize(savedInstanceState);
		onPostCreate(savedInstanceState);
	}

	protected void onInitialize(Bundle savedInstanceState) {
	}

	protected void onPostCreate(Bundle savedInstanceState) {
	}

	protected void exit() {
		((BaseActivity) getActivity()).exit();
	}

	protected Context getContext() {
		return getActivity().getApplicationContext();
	}

	protected Fragment getFragment() {
		return this;
	}
}
